Developer Documentation

QuickTime 4 API Documentation

Inside Macintosh: QuickTime

Previous | Overview | Contents | Next |

Standard File Activation Functions

The CustomGetFilePreview function presents an Open dialog box to the user and allows the user to view file previews. This function differs from the StandardGetFilePreview function in that you can provide a custom dialog template and functions to support your template. The CustomGetFilePreview function corresponds to the File Manager's CustomGetFile routine.

You specify your activation function in the activateProc parameter. An activation function controls the highlighting of any items whose shape is known only by your application. See Inside Macintosh: Files for more information about standard file activation routines.

MyActivateProc

An activation function should have the following form:

pascal void MyActivateProc (DialogPtr theDialog, short itemNo,
                                          Boolean activating, Ptr myDataPtr);
theDialog
A pointer to the dialog structure of the dialog box.

itemNo
The number of the item selected.

activating
A Boolean value that specifies whether the field is being activated ( true ) or deactivated ( false ).

myDataPtr
A pointer to the optional data whose address is passed to CustomGetFilePreview .

DESCRIPTION

Ordinarily, you need to supply an activation function only if your application builds a list from which the user can select entries. The Standard File Package supplies the activation routine for the file display list and for all TextEdit fields. You can also use the activation function to keep track of which field is receiving keyboard input, if your application needs that information.

Your application is responsible for removing the highlighting when one of its fields becomes inactive and for adding the highlighting when one of its fields becomes active. The Standard File Package can handle the highlighting of all TextEdit fields, even those defined by your application.


© 1999 Apple Computer, Inc.

Previous | Overview | Contents | Next